package com.ruoyi.web.controller.drugs;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.drugs.domain.Dramaintain;
import com.ruoyi.drugs.domain.DrugsUnit;
import com.ruoyi.drugs.service.IDruDrmaintainService;
import com.ruoyi.drugs.service.IDruDrugsUnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/drugs/drugsUnit")
public class DrugsUnitController extends BaseController {
    @Autowired
    private IDruDrugsUnitService service;


    /**
     * 根据状态获取检查费用列表
     */
    @PreAuthorize("@ss.hasPermi('drugs:drmaintain:querys')")
    @GetMapping("/list")
    public TableDataInfo lists(Dramaintain dramaintain)
    {
        startPage();
        List<DrugsUnit> list = service.selectDrugsUnitLists(dramaintain);
        return getDataTable(list);
    }
}
